<template>
  <div>
    <input type="text" :value="value" @input="input" @blur="blur">
  </div>
</template>

<script>
import emitter from './form-bus'
export default {
  mixins: [emitter],
  name: 'ElFormInput',
  componentName: 'ElFormInput',
  props: {
    value: String
  },
  created () {
    this.$on('xixi', function (arg) {
      console.log(arg)
    })
  },
  mounted () {
    this.dispatch('ElForm', 'haha', '哈哈')
  },
  methods: {
    input (e) {
      this.$emit('input', e.target.value)
    },
    blur (e) {
      this.dispatch('ElFormItem', 'vali')
    }
  }
}
</script>